{% extends 'admin/admin.html' %}

{% block content %}
     <section class="content-header">
            <h1>微电影管理系统</h1>
            <ol class="breadcrumb">
                <li><a href="#"><i class="fa fa-dashboard"></i> 电影管理</a></li>
                <li class="active">添加电影</li>
            </ol>
        </section>
        <section class="content" id="showcontent">
            <div class="row">
                <div class="col-md-12">
                    <div class="box box-primary">
                        <div class="box-header with-border">
                            <h3 class="box-title">添加电影</h3>
                        </div>
                        <form role="form">
                            <div class="box-body">
                                <div class="form-group">
                                    <label for="input_title">片名</label>
                                    <input type="text" class="form-control" id="input_title" placeholder="请输入片名！">
                                </div>
                                <div class="form-group">
                                    <label for="input_url">文件</label>
                                    <input type="file" id="input_url">
                                    <div style="margin-top:5px;">
                                        <div id="moviecontainer"></div>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="input_info">介绍</label>
                                    <textarea class="form-control" rows="10" id="input_info"></textarea>
                                </div>
                                <div class="form-group">
                                    <label for="input_logo">封面</label>
                                    <input type="file" id="input_logo">
                                    <img data-src="holder.js/262x166" style="margin-top:5px;" class="img-responsive"
                                         alt="">
                                </div>
                                <div class="form-group">
                                    <label for="input_star">星级</label>
                                    <select class="form-control" id="input_star">
                                        <option value="1">1星</option>
                                        <option value="2">2星</option>
                                        <option value="3">3星</option>
                                        <option value="4">4星</option>
                                        <option value="5">5星</option>
                                    </select>
                                </div>
                                <div class="form-group">
                                    <label for="input_tag_id">标签</label>
                                    <select class="form-control" id="input_tag_id">
                                        <option value="1">科幻</option>
                                        <option value="2">冒险</option>
                                        <option value="3">爱情</option>
                                        <option value="4">动作</option>
                                        <option value="5">战争</option>
                                    </select>
                                </div>
                                <div class="form-group">
                                    <label for="input_area">地区</label>
                                    <input type="text" class="form-control" id="input_area" placeholder="请输入地区！">
                                </div>
                                <div class="form-group">
                                    <label for="input_length">片长</label>
                                    <input type="text" class="form-control" id="input_length" placeholder="请输入片长！">
                                </div>
                                <div class="form-group">
                                    <label for="input_release_time">上映时间</label>
                                    <input type="text" class="form-control" id="input_release_time"
                                           placeholder="请选择上映时间！">
                                </div>
                            </div>
                            <div class="box-footer">
                                <button type="submit" class="btn btn-primary">添加</button>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </section>
{% endblock %}

{% block js %}
    <script src="{{ url_for('static',filename='jwplayer/jwplayer.js') }}"></script>
<script type="text/javascript">
    jwplayer.key = "P9VTqT/X6TSP4gi/hy1wy23BivBhjdzVjMeOaQ==";

</script>
<script type="text/javascript">
    jwplayer("moviecontainer").setup({
        flashplayer: "{{ url_for('static',filename='jwplayer/jwplayer.flash.swf') }}",
        playlist: [{
            file: "{{ url_for('static',filename='video/htpy.mp4') }}",
            title: "环太平洋"
        }],
        modes: [{
            type: "html5"
        }, {
            type: "flash",
            src: "{{ url_for('static',filename='jwplayer/jwplayer.flash.swf') }}"
        }, {
            type: "download"
        }],
        skin: {
            name: "vapor"
        },
        "playlist.position": "left",
        "playlist.size": 200,
        height: 250,
        width: 387,
    });

</script>
<script>
    $(document).ready(function(){
        $('#input_release_time').datepicker({
            autoclose: true,
            format: 'yyyy-mm-dd',
            language: 'zh-CN',
        });
    });

</script>
{% endblock %}